import request from '@/utils/request';

// 统计信息
export const getStatisticsInfo = () => {
  return request({
    url: 'omen/statistics',
    method: 'GET',
  });
};

// 台站列表

export const getStationList = () => {
  return request({
    url: 'omen/list',
    method: 'GET',
  });
};

export const getStationItemList = (dcunitcode: string) => {
  return request({
    url: 'omen/itemList/' + dcunitcode,
    method: 'GET',
  });
};

// 获取仪器信息
export const getInstrumentList = (stationCode: string) => {
  return request({
    url: 'omen/instruments/' + stationCode,
    method: 'GET',
  });
};

// 获取测点信息
export const getPointList = (stationCode: string) => {
  return request({
    url: 'omen/points/' + stationCode,
    method: 'GET',
  });
};

// 获取地磁场地信息
export const getGeomagField = (stationCode: string) => {
  return request({
    url: 'omen/statGeomag/' + stationCode,
    method: 'GET',
  });
};
// 获取磁标变迁信息
export const getGeomagVariation = (stationCode: string) => {
  return request({
    url: 'omen/statGeomagVariation/' + stationCode,
    method: 'GET',
  });
};
// 获取地电场地信息
export const getElectroField = (stationCode: string) => {
  return request({
    url: 'omen/statElectr/' + stationCode,
    method: 'GET',
  });
};

// 获取地电测项信息
export const getElectrItems = (stationCode: string) => {
  return request({
    url: 'omen/statElectrItems/' + stationCode,
    method: 'GET',
  });
};

// 获取泉信息
export const getSpringInfo = (stationCode: string) => {
  return request({
    url: 'omen/statSpring/' + stationCode,
    method: 'GET',
  });
};

// 获取井信息
export const getWellInfo = (stationCode: string) => {
  return request({
    url: 'omen/statWell/' + stationCode,
    method: 'GET',
  });
};

// 获取井测项信息
export const getWellItems = (stationCode: string) => {
  return request({
    url: 'omen/statWellItems/' + stationCode,
    method: 'GET',
  });
};

// 获取洞体信息
export const getCaveInfo = (stationCode: string) => {
  return request({
    url: 'omen/statCave/' + stationCode,
    method: 'GET',
  });
};

// 获取洞体测项信息
export const getCaveItemsInfo = (stationCode: string) => {
  return request({
    url: 'omen/statCaveItems/' + stationCode,
    method: 'GET',
  });
};

// 获取断层信息
export const getFaultsInfo = (stationCode: string) => {
  return request({
    url: 'omen/faults/' + stationCode,
    method: 'GET',
  });
};

// 仪器信息列表
export const getOmenInstrumentList = (params: any) => {
  return request({
    url: 'omen/instrumentList',
    method: 'GET',
    params,
  });
};

// 修改仪器监控状态
export const changeInstrumentMonitorStatus = (data: any) => {
  return request({
    url: 'omen/instrumentMonitor',
    method: 'POST',
    data,
  });
};

// 监控列表-形变类仪器列表
export const getDeformationList = (params: any) => {
  return request({
    url: 'omen/deformationList',
    method: 'GET',
    params,
  });
};

// 获取形变类仪器实时数据
export const getDeformationRealtime = (params: any) => {
  return request({
    url: 'deformation/getDeformationRealtime',
    method: 'GET',
    params,
  });
};

// 获取台站详情
export const getStationDetail = (params: any) => {
  return request({
    url: 'omen/detail',
    method: 'GET',
    params,
  });
};
